import wx

class Yiwin_Panel(wx.Panel):  
    '''
    panel
    '''
    def __init__(self, parent, para={} ):
        '''
        * panel 初始化后的样子
        '''
        self.ParaSettingData = para
        super(Yiwin_Panel,self).__init__(parent)
        self.locale = wx.Locale(wx.LANGUAGE_CHINESE_SIMPLIFIED)

        self.SetBackgroundColour('lightgrey')

        self.box = wx.BoxSizer(wx.HORIZONTAL)

        self.list = wx.ListCtrl(self, -1, style = wx.LC_REPORT | wx.LC_SORT_ASCENDING)
        self.list.SetBackgroundColour( 'lightgrey'  )

        self.list.InsertColumn(0, u'测量时间', width = 180)
        i = 1
        for  val in self.ParaSettingData.values():
            self.list.InsertColumn(i, val, wx.LIST_FORMAT_RIGHT,width = 80)
            i+=1
        self.list.SetFont( wx.Font( 12, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False ) )


        self.box.Add(self.list,1,wx.EXPAND)
        self.SetSizer(self.box)
        self.Fit()  

      

